import Ax from '../api';

export default {
  roomDeviceAdd: (param = {}) => Ax.post(`/roomDevice/add`, param),
  roomDeviceEdit: (param = {}) => Ax.post(`/roomDevice/edit`, param),
  roomDeviceDelete: (query) => Ax.delete(`/roomDevice/delete?_id=${query._id}`),
  roomDeviceList: (query) => Ax.get(`/roomDevice/list?roomId=${query.roomId}`),
  roomDeviceFavoritesAdd: (param = {}) => Ax.post(`/user/favorites`, param),
  roomDeviceFavoritesDel: (query = {}) => Ax.delete(`/user/favorites?type=roomDevice&itemId=${query._id}`),
  roomDeviceFavoritesList: () => Ax.get(`/user/favorites?type=roomDevice`),
};
